package com.firewolf.rbac.controller;

import com.firewolf.rbac.log.core.OperationLog;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.Iterator;
import java.util.List;

/**
 * 作者：刘兴
 * 时间:19/2/21
 **/
@RestController
@RequestMapping("/test")
public class TestController {

    @GetMapping
    @OperationLog(opreate = "这是一个测试而已")
    public String hello() {
        return "hello,world";
    }


    public static void main(String[] args) {

        System.out.println(aa());


    }

    public static int aa(){
        int i = 0;
        try {
            if (10 / i == 0) {
                i = 2;
            } else {
                i++;
            }
        } catch (Exception e) {
            return i;
        } finally {
            i = 1;
            return  i;
        }
    }
}
